﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TimKenSite.Master" AutoEventWireup="true"
    CodeBehind="PromotionProducts.aspx.cs" Inherits="TimKen.Web.PromotionProducts" %>

<%@ Register Src="UserControls/ProductResources.ascx" TagName="ProductResources"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="Common/Style/common.css" rel="stylesheet" type="text/css" />
    <link href="Common/Style/PagerStyle.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(function () {
            $(".nav_li").hover(function () {//鼠标放上去时候的效果
                $(this).children("a").addClass("navon"); //鼠标放上去的加上高亮
                $(this).children("div").show(); //鼠标放上去的二级栏目出来
                $(this).siblings().children("a").removeClass("navon"); //其他的高亮取消
                $(".common_search_tk").css("position", "static");
                $(".common_search_tkicon").hide();
            }, function () {//鼠标移开时候的效果
                $(this).children("a").removeClass("navon"); //鼠标移开去掉高亮
                $(this).children("div").hide(); //鼠标移开隐藏二级栏目
                $(".common_search_tk").css("position", "relative");
                $(".common_search_tkicon").show();
                $(".nav_li:eq(2)").children("a").addClass("navon"); //回到当前栏目高亮
            });
        });
        $(document).ready(function () {
            $(".nav_li:eq(2)").children("a").addClass("navon").parent().siblings().children("a").removeClass();
            $(".left_nav ul li:eq(3)").children("a").addClass("left_navon"); //左侧导航，当前栏目高亮	
        });
        window.onload = function () { for (var ii = 0; ii < document.links.length; ii++) document.links[ii].onfocus = function () { this.blur() } }	
    </script>
    <style>
        .imgbtnsty
        {
            vertical-align: middle;
            margin-left: 10px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="server">
    <uc1:ProductResources ID="ProductResources1" runat="server" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="body" runat="server">
    <form runat="server">
    <div class="rtitle">
        <%=GetLangString("PromoteProducts")%></div>
    <asp:Repeater ID="repProduct" runat="server" OnItemCommand="repProduct_ItemCommand">
        <ItemTemplate>
            <div class="search_result_div">
                <ul class="search_resultL">
                    <a href='ProductInfo.aspx?ProductID=<%#Eval("ProductID")%>'>
                        <img src="<%#GetProductImage(int.Parse(Eval("ProductID").ToString())) %>" width="150"
                            height="140" alt="" /></a>
                </ul>
                <ul class="search_resultR">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td colspan="3" style="line-height:18px;">
                                <%#GetLangString("Description")%>：<%#GetSubString(checkStr(Eval("Description").ToString()),100)%></td>
                        </tr>
                        <tr>
                            <td width="115">
                                <%#GetLangString("BrandName")%>：<%#Eval("BrandName")%></td>
                            <td width="140">
                                <%#GetLangString("ItemCode")%>：<%#Eval("ItemCode")%></td>
                            <td width="245">
                                <%#GetLangString("ProductName")%>：<%#Eval("Name")%></td>
                        </tr>
                        <tr>
                            <td>
                                <%#GetLangString("Weight")%>：<%#Eval("Weight")%><%#Eval("WeightUnit").ToString().ToUpper()%></td>
                            <td>
                                <%#GetLangString("MinMultiple")%>：<%#Eval("MinMultiple")%></td>
                            <td>
                                <%#GetLangString("MinNumber")%>：<%#Eval("MinNumber")%></td>
                        </tr>
                        <tr>
                            <td>
                                <%#GetLangString("ShipDays")%>：<%#Eval("ShipDays")%></td>
                            <td colspan="2">
                                <%=GetLangString("BasicPrice") %>： <span>
                                    <%#GetProductBasePrice(int.Parse(Eval("ProductID").ToString())).Price.Equals(0)?GetLangString("Price0Desc"):GetProductBasePrice(int.Parse(Eval("ProductID").ToString())).Price.ToString()+GetProductBasePrice(int.Parse(Eval("ProductID").ToString())).Currency%>
                                </span><span class="search_resultRH">(<%=GetLangString("NoTax") %>)</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <code><a href='ProductInfo.aspx?ProductID=<%#Eval("ProductID")%>'>
                                    <%#GetLangString("DetailInfo")%>&gt;&gt;</a></code>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <%=GetLangString("ShowIvq")%>：<%# SetInventoryString(DataBinder.Eval(Container.DataItem, "InvQty"))%></td>
                            <td colspan="2">
                                <%=GetLangString("ShopNumber")%>：
                                <asp:TextBox ID="txtNumber" Width="55px" onkeydown="return testKeyEven(event);" runat="server" class="search_resultRin"></asp:TextBox>
                                      <asp:ImageButton ID="btnAddToShoppingCart" runat="server" ToolTip='<%#GetLangString("AddToShoppingCart")%>'
                                        CommandName="AddToShoppingCart" CommandArgument='<%#Eval("ProductID")%>' 
                                        ImageUrl='<%#LanguageID==1?"Common/Image/iconbtnbg/gwc_btn.gif":"Common/Image/iconbtnbg_en/gwc_btn.gif"%>' />
                                       <asp:ImageButton ID="btFavorite" runat="server" CommandArgument='<%# Eval("ProductID") %>'
                                        CommandName="Favorite" ToolTip='<%#GetLangString("AddToFavorite") %>' 
                                        ImageUrl='<%#LanguageID==1?"Common/Image/common/search_sc.gif":"Common/Image/iconbtnbg_en/search_btn.gif"%>' />
                                      
                            </td>
                        </tr>
                    </table>
                </ul>
            </div>
        </ItemTemplate>
    </asp:Repeater>
    <asp:Literal runat="server" ID="ltEmptyData" Visible="false"></asp:Literal>
    <%--<ux:AspNetPager ID="AspNetPager1" runat="server" Width="95%" ShowPageIndexBox="Always"
    HorizontalAlign="right" EnableTheming="true" AlwaysShow="true" PageIndexBoxType="DropDownList"
    OnPageChanged="AspNetPager1_PageChanged" ImagePath="/images/" NavigationButtonType="Image"
    ButtonImageNameExtension="n" CpiButtonImageNameExtension="r" PagingButtonType="Image">
</ux:AspNetPager>--%>
    <ux:AspNetPager ID="AspNetPager1" CssClass="paginator" CurrentPageButtonClass="cpb"
        runat="server" AlwaysShow="True" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页"
        PageSize="10" PrevPageText="上一页" ShowCustomInfoSection="Left" ShowNavigationToolTip="true"
        OnPageChanged="AspNetPager1_PageChanged" CustomInfoTextAlign="Left" LayoutType="Table"
        ButtonImageNameExtension="n" CpiButtonImageNameExtension="r" CustomInfoHTML=""
        CustomInfoSectionWidth="">
    </ux:AspNetPager>
    </form>
</asp:Content>
